Add type hint to entering PoolAcquireContext.#763
Closed
robhaswell wants to merge 2 commits intoMagicStack:masterfrom
Closed
Add type hint to entering PoolAcquireContext.#763robhaswell wants to merge 2 commits intoMagicStack:masterfrom
robhaswell wants to merge 2 commits intoMagicStack:masterfrom
Conversation
…eturns a Connection.
|
i face the same issue today in 2022. and for whatever reason "-> connection.Connection:" doesn't seem to be working. But if i actually "from .connection import Connection" and make it "-> Connection:", everything works great. I don't feel like a very experienced pullrequester, can someone please check what's wrong 😂 |
Contributor
|
See my explanation in #578 (comment). This would actually be incorrect and I have proposed an improved patch in that PR. I'd suggest closing this PR to not have two PRs open with the same intent. |
Author
|
Thanks will do. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch allows type checking editors like VScode to determine that
async with pg.acquire() as connresults inconnhaving a type ofasyncpg.connection.Connection.